Skip to content

refactor(storyteller): own storyteller L0 prompts/rules and adopt Core chat window and request helpers - #24

Merged
mcocdaa merged 1 commit into
mainfrom
refactor/generic-separation-live-fixes
Nov 21, 2026
Merged

mcocdaa merged 1 commit into
mainfrom
refactor/generic-separation-live-fixes

Conversation

@mcocdaa

@mcocdaa mcocdaa commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Moves storyteller_system and storyteller_rules prompts and EN/ZH keys into RimMind-Storyteller; explicitly sets WithRequireAliveColonist(false); migrates Window_StorytellerDialogue onto Core RimMindChatWindowBase (fixing PostClose cancellation leak); extracts StorytellerMemoryPromptFormatter and adopts Core Json/Settings/Cache/TrOr helpers. Verified with 27/27 tests.

…e chat window and request helpers

refactor: adopt Core APIs and extract storyteller prompt formatting

- Route text, JSON, settings, request, and context access through the
  RimMindAPI facade (Text.TrOr, Json.*, Settings.IsConfigured,
  Request.ClearModCooldown, Context.RegisterScenario) instead of local
  helpers and legacy static calls.
- Extract stateless prompt formatting from StorytellerMemory into a new
  StorytellerMemoryPromptFormatter, keeping the WorldComponent focused on
  storage and persistence.
- Register storyteller_system and storyteller_rules L0 context providers
  with localized defaults, and add the corresponding English and Chinese
  prompt keys.
- Rebase Window_StorytellerDialogue on RimMindChatWindowBase so in-flight
  requests are cancelled on close and late replies are dropped.
- Delegate StorytellerResponseParserPure to Core JSON repair and pseudo
  function call parsing, removing the duplicated regex/repair logic.
- Replace the manual instance field with WorldScopedComponentCache and
  mark PawnLookup/PawnLookupCore obsolete in favor of RimMindPawnLookup.
- Opt storyteller requests out of the alive-colonist liveness gate.
- Add adoption contract tests and expand Verse stubs to cover the chat
  window, JSON, and context registry surfaces.
@mcocdaa
mcocdaa merged commit 384cea0 into main Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@mcocdaa
mcocdaa deleted the refactor/generic-separation-live-fixes branch November 21, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant